<script setup lang="ts">
import { useTabs } from 'vc/src/web/multiple-tabs/use';
import PageLoading from '@/components/page-loading/index.vue';
interface Props {
  loading: boolean
  error: any
  isNoData?: boolean
}

const {
  loading,
  error,
  isNoData
} = defineProps<Props>();

const { refreshPage } = useTabs();
</script>

<template>
  <page-loading :loading="loading" />
  
  <div class="flex-center w-full h-full">
    <vc-nodata v-if="!loading && error" :type="104">
      加载失败，请
      <span style="color: #0171f6; cursor: pointer" @click="refreshPage()">点击</span>
      重试
    </vc-nodata>
    <vc-nodata v-else-if="!loading && isNoData" :type="100"></vc-nodata>
  </div>
</template>
